<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;


class Comment extends Model {
    use SoftDeletes;
    protected $dates = ['deleted_at'];


    public function user() {
        return $this->hasOne('App\Models\User', 'id', 'uid');
    }

    public function post() {
        return $this->belongsTo('App\Models\Post', 'post_id', 'id');
    }
}
